package com.yenlien.traceyun.plant.dao;

import com.yenlien.traceyun.plant.entity.SoilEquipment;
import com.yenlien.traceyun.webase.dao.BaseJpaDao;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @author: bigwangy@sina.com
 * @create: 2020-11-12
 * @description:
 **/
public interface SoilEquipmentDao extends BaseJpaDao<SoilEquipment> {

    @Query(value = "select equipment_id  from t_plant_soil_equipment where soil_id=?1", nativeQuery = true)
    public List<String> findIdySoilId(String soilId);

    public List<SoilEquipment> findBySoilId(String soilid);

    public List<SoilEquipment> findByEquipmentId(String equipmentId);

    public void deleteByEquipmentId(String equipmentId);
}
